package integration.properties.compression;

import integration.properties.compression.impl.BZCompressionTypeImpl;
import integration.properties.compression.impl.L4zCompressionTypeImpl;
import integration.properties.compression.impl.ZCompressionTypeImpl;

public class CompressionFactory {

    public static CompressionType createCompressionType (String compressionType) {
        if (("z").equalsIgnoreCase(compressionType)) return new ZCompressionTypeImpl();
        else if (("l4z").equalsIgnoreCase(compressionType)) return new L4zCompressionTypeImpl();
        else if (("bz").equalsIgnoreCase(compressionType)) return new BZCompressionTypeImpl();
        else throw new IllegalArgumentException("Invalid compression type requested at target location: " + compressionType);
    }

}
